<template>
	<!-- <el-alert title="异步组件动态加载使用了正处于试验阶段的<Suspense>组件, 其API和使用方式可能会改变. <Suspense> is an experimental feature and its API will likely change." type="warning" show-icon style="margin-bottom: 15px;"/> -->

	<el-card shadow="never" header="个人信息">
		<el-form ref="form" :model="form" label-width="120px" style="margin-top:20px;" disabled>
			<el-form-item label="账号">
				<el-input v-model="form.number"></el-input>
			</el-form-item>
			<el-form-item label="姓名">
				<el-input v-model="form.employeeName"></el-input>
			</el-form-item>
			<el-form-item label="公司">
				<el-input v-model="form.companyName"></el-input>
			</el-form-item>
			<el-form-item label="部门">
				<el-input v-model="form.deptName"></el-input>
			</el-form-item>
			<el-form-item label="邮箱">
				<el-input v-model="form.email"></el-input>
			</el-form-item>
			<el-form-item label="在线人数" v-if="onLineUsers>0">
				<el-input v-model="onLineUsers"></el-input>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
export default {
	data() {
		return {
			form: {
			},
			onLineUsers:0
		}
	},
	mounted() {
		// this.form = this.$TOOL.data.get("USER_INFO");
		this.getUserInfo()
	},
	methods: {
		async getUserInfo() {
			// var params = {
			// 	Authorization: this.token,
			// };
			var res = await this.$API.auth.getBaseUserInfo.post();
			if (res.code == 200) {
				this.form = res.data
				this.onLineUsers = res.onLineUsers
			}
		},
	}
}
</script>

<style></style>
